﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class WebForm_OrgData : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            gv.DataBind();
        }
    }

    protected void btnAdd_Click(object sender, EventArgs e)
    {
        mv.SetActiveView(mvForm);
        fv.ChangeMode(FormViewMode.Insert);
        fv.DataBind();
    }

    protected void btnBack_Click(object sender, EventArgs e)
    {
        gv.DataBind();
    }

    protected void fv_ItemCommand(object sender, FormViewCommandEventArgs e)
    {
        switch (e.CommandName)
        {
            case "MySave":
                MyObj.ShowMessage("Form", "msgSaveOK");
                gv.DataBind();

                break;
            case "MyCancel":
                gv.DataBind();
                break;
        }
    }

    protected void gv_ItemCommand(object sender, GridViewCommandEventArgs e)
    {
        switch (e.CommandName)
        {
            default:
                break;
        }
    }
}